// Lindsay Gilmour
// Adam Lusch
// Dan Niceswanger
//
// Computer Graphics Project 1:
// Asteroids!
// A Tribute

#include "AlienBullet.h"

AlienBullet::AlienBullet(b2World* w, float32 x, float32 y, float32 angle, const b2Vec2& vel)
	: Bullet(w, x, y, angle, vel, MAGIC_NUMBER)
{
}

AlienBullet::~AlienBullet()
{
}

void AlienBullet::draw()
{
	--ttl;
	
	b2Vec2 position = body->GetPosition();
	float32 angle = body->GetAngle();

	glPushMatrix();
	
	glTranslatef(position.x, position.y, 0.0);
	glRotatef(angle*180.0/M_PI, 0.0, 0.0, 1.0);
	
	glLineWidth(2);
	
	glColor3f(0.0f, 0.5f, 1.0f);
	glCallList(baseDisplayList);
	
	glPopMatrix();
}
